package com.micro.ai.auth.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用户会话DTO
 * 
 * @author micro-ai
 * @since 0.0.1
 */
@Data
@Schema(description = "用户会话信息")
public class UserSessionDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "会话ID")
    private String id;

    @Schema(description = "用户ID")
    private String userId;

    @Schema(description = "租户ID")
    private String tenantId;

    @Schema(description = "设备ID")
    private String deviceId;

    @Schema(description = "设备名称")
    private String deviceName;

    @Schema(description = "设备类型：web, mobile, tablet, desktop, other")
    private String deviceType;

    @Schema(description = "IP地址")
    private String ipAddress;

    @Schema(description = "User-Agent")
    private String userAgent;

    @Schema(description = "登录位置")
    private String location;

    @Schema(description = "最后活跃时间")
    private LocalDateTime lastActiveAt;

    @Schema(description = "过期时间")
    private LocalDateTime expiresAt;

    @Schema(description = "创建时间（登录时间）")
    private LocalDateTime createdAt;

    @Schema(description = "是否为当前会话")
    private Boolean isCurrent;
}

